// 深拷贝
export function deepClone(obj) {
  if (typeof obj !== 'object' || obj === null) {
    return obj;
  }
  let result = Array.isArray(obj) ? [] : {};
  for (const key in obj) {
    result[key] = deepClone(obj[key]);
  }
  return result;
}

export default function generateUniqueId() {
  return (
    "id-" + Date.now().toString(36) + Math.random().toString(36).substr(2, 5)
  );
}